<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"
     template="../../Template.xhtml"
>
<ui:define name="title"></ui:define>
<ui:define name="body">

<script>


</script>
<h:form id="form">
<br/><br/>
<p:panelGrid columns="2">

<h2>Manage Language </h2>
<p:commandButton ajax="false" value="Add New" action="AddLanguage.xhtml" />
   
</p:panelGrid>
<br/><br/><br/><br/>
 <p:growl id="msgs" showDetail="true"  />
 
    <p:dataTable id="basicDT" var="car" value="#{languageMB.getListLangue()}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
      
        <p:column headerText="Id">
            <h:outputText value="#{car.id}" />
        </p:column>
        <p:column headerText="Country">
        
             <h:outputText value="#{car.pays.intitule}" />
       </p:column>
        <p:column headerText="Language Code">
              <h:outputText value="#{car.code}" />
      
        </p:column>
        
        <p:column headerText="flag">
              <h:outputText value="#{car.drapeau}" />
      
        </p:column>
        
        <p:column headerText="Languge File">
              <h:outputText value="fichier" />
      
        </p:column>
        
        <p:column headerText="Statut">
              <h:outputText value="#{car.statut}" />
        </p:column>
        
        <p:column style="width:32px;text-align: center">
      
             <p:commandButton ajax="false" action="#{languageMB.edit(car.id)}" icon="ui-icon ui-icon-pencil">
            </p:commandButton>
            <p:commandButton ajax="false" action="#{languageMB.Supprimer(car.id)}" icon="ui-icon ui-icon-close">
            </p:commandButton>
         </p:column>
      
    </p:dataTable>
 </h:form>
 <br/><br/><br/><br/>
</ui:define>

</ui:composition>